

/****** Object:  StoredProcedure [dbo].[web_upd_klij_percent]    Script Date: 10/19/2013 09:20:36 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND name = 'web_upd_klij_percent')
DROP PROCEDURE web_upd_klij_percent
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[web_upd_klij_percent]
	@N08_c_suma_wk_per int,
	@N08_c_kodas_ks char(12)
AS
BEGIN
	SET NOCOUNT ON;

		If exists(SELECT * FROM n08_klij_c where N08_c_kodas_ks = @N08_c_kodas_ks)
			update n08_klij_c set N08_c_suma_wk_per = @N08_c_suma_wk_per  where N08_c_kodas_ks = @N08_c_kodas_ks;
		else
			insert INto n08_klij_c ([N08_c_kodas_ks]
           ,[N08_c_suma_wk_per]) values (@N08_c_kodas_ks,@N08_c_suma_wk_per);
   
END

GO

